const pool = require('../tools/getPool');
const sendResponse = require('../tools/sendResponse');

module.exports = function(req, res){

	if (req.session.login == true) {
		var result = {};
		result.success = 'ok';
		result.isLogin = true;
		result.account = req.session.account;
		result.name = req.session.name;
		result.able = req.session.able;
		result.type = req.session.type;
		result.id  	= req.session.id;
		sendResponse('ok','had logined', result, res);
	} else {
		sendResponse('error','unlogin', null, res);
	}

}